Some Simple Examples

Dump CGI Example 1
One of the simplest example CGIs is the Dump CGI. Dump takes the information you feed to it and returns a web page made up of that information. This examples uses the GET method, which means the information in the form is appended to the URL.
Dump.cgi is an Applescript, saved as an Application.
Dump CGI Example 2
This second example of the Dump CGI uses the POST method, which means the information in the form is not appended to the URL, it is passed invisibly to the user. The POST method can pass roughly 24K of information to the server, as opposed to a maximum of 4K is you use the GET method. It is unlikely these restrictions will be an issue for most CGIs.
Paragraph Example
The third example returns a complete web page which uses the arguments you pass from the form. A trivial example, although the source to the script shows how clunky AppleScript can be to work with.
Several instructive features can
Previous Next
How They Work Making CGIs work with NetPresenz